import VueRouter from 'vue-router'
import BookManager from '../pages/BookManager'
import AddBook from '../pages/AddBook'
import BookUpdate from '../pages/BookUpdate'
import Index from '../components/Index'
import App from '../App'

const router = new VueRouter({
    routes: [
        {
            path: '/',
            name: '图书管理',
            component: Index,
            redirect: "/BookManager",
            show: true,
            children: [
                {
                    path: '/BookManager',
                    name: '查询图书',
                    component: BookManager
                },
                {
                    path: '/AddBook',
                    name: '添加图书',
                    component: AddBook,
                },
                {
                    path: '/update',
                    show: false,
                    name: '更新图书',
                    component: BookUpdate,
                }
            ]
        },
        
    ]
})

export default router